# Description:
#   Build file for tree-X hybrids.

package(
    default_visibility = ["//visibility:public"],
    licenses = ["notice"],
)

cc_library(
    name = "tree_x_params",
    srcs = ["tree_x_params.cc"],
    hdrs = ["tree_x_params.h"],
    tags = ["local"],
    deps = [
        "//scann/base:search_parameters",
        "//scann/utils:common",
        "//scann/utils:types",
    ],
)

cc_library(
    name = "leaf_searcher_optional_parameter_creator",
    hdrs = ["leaf_searcher_optional_parameter_creator.h"],
    tags = ["local"],
    deps = [
        "//scann/base:search_parameters",
        "//scann/data_format:datapoint",
        "//scann/utils:types",
    ],
)

cc_library(
    name = "mutator",
    hdrs = ["mutator.h"],
    tags = ["local"],
    deps = [
        "//scann/base:single_machine_base",
        "//scann/data_format:datapoint",
        "//scann/data_format:dataset",
        "//scann/hashes/asymmetric_hashing2:searcher",
        "//scann/oss_wrappers:scann_aligned_malloc",
        "//scann/oss_wrappers:scann_down_cast",
        "//scann/oss_wrappers:scann_status",
        "//scann/oss_wrappers:scann_threadpool",
        "//scann/oss_wrappers:tf_dependency",
        "//scann/partitioning:kmeans_tree_partitioner",
        "//scann/proto:partitioning_cc_proto",
        "//scann/utils:common",
        "//scann/utils:datapoint_utils",
        "//scann/utils:parallel_for",
        "//scann/utils:single_machine_autopilot",
        "//scann/utils:types",
        "//scann/utils:zip_sort",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/container:flat_hash_set",
        "@com_google_absl//absl/flags:flag",
        "@com_google_absl//absl/log",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/strings:str_format",
    ],
)

cc_library(
    name = "tree_x_hybrid_smmd",
    srcs = ["tree_x_hybrid_smmd.cc"],
    hdrs = ["tree_x_hybrid_smmd.h"],
    tags = ["local"],
    deps = [
        ":leaf_searcher_optional_parameter_creator",
        ":mutator",
        ":tree_x_params",
        "//scann/base:search_parameters",
        "//scann/base:single_machine_base",
        "//scann/base:single_machine_factory_options",
        "//scann/brute_force:scalar_quantized_brute_force",
        "//scann/data_format:datapoint",
        "//scann/data_format:dataset",
        "//scann/distance_measures:distance_measure_base",
        "//scann/oss_wrappers:scann_aligned_malloc",
        "//scann/oss_wrappers:scann_down_cast",
        "//scann/oss_wrappers:scann_status",
        "//scann/oss_wrappers:scann_threadpool",
        "//scann/oss_wrappers:tf_dependency",
        "//scann/partitioning:kmeans_tree_partitioner",
        "//scann/partitioning:partitioner_base",
        "//scann/partitioning:partitioner_cc_proto",
        "//scann/tree_x_hybrid/internal:batching",
        "//scann/tree_x_hybrid/internal:utils",
        "//scann/utils:common",
        "//scann/utils:fast_top_neighbors",
        "//scann/utils:hash_leaf_helpers",
        "//scann/utils:top_n_amortized_constant",
        "//scann/utils:types",
        "//scann/utils/fixed_point:pre_quantized_fixed_point",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/container:flat_hash_set",
        "@com_google_absl//absl/container:node_hash_map",
        "@com_google_absl//absl/flags:flag",
        "@com_google_absl//absl/log",
        "@com_google_absl//absl/log:check",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/time",
        "@com_google_absl//absl/types:span",
        "@com_google_googletest//:gtest_main",
    ],
)

cc_library(
    name = "tree_ah_hybrid_residual",
    srcs = ["tree_ah_hybrid_residual.cc"],
    hdrs = ["tree_ah_hybrid_residual.h"],
    tags = ["local"],
    deps = [
        ":mutator",
        ":tree_x_params",
        "//scann/base:search_parameters",
        "//scann/base:single_machine_base",
        "//scann/data_format:datapoint",
        "//scann/data_format:dataset",
        "//scann/distance_measures",
        "//scann/hashes/asymmetric_hashing2:indexing",
        "//scann/hashes/asymmetric_hashing2:querying",
        "//scann/hashes/asymmetric_hashing2:searcher",
        "//scann/hashes/asymmetric_hashing2:serialization",
        "//scann/hashes/asymmetric_hashing2:training",
        "//scann/hashes/asymmetric_hashing2:training_options",
        "//scann/oss_wrappers:scann_aligned_malloc",
        "//scann/oss_wrappers:scann_down_cast",
        "//scann/oss_wrappers:scann_serialize",
        "//scann/oss_wrappers:scann_status",
        "//scann/oss_wrappers:tf_dependency",
        "//scann/partitioning:kmeans_tree_like_partitioner",
        "//scann/partitioning:kmeans_tree_partitioner",
        "//scann/projection:projection_factory",
        "//scann/proto:centers_cc_proto",
        "//scann/proto:distance_measure_cc_proto",
        "//scann/proto:hash_cc_proto",
        "//scann/tree_x_hybrid/internal:batching",
        "//scann/tree_x_hybrid/internal:utils",
        "//scann/trees/kmeans_tree",
        "//scann/utils:common",
        "//scann/utils:fast_top_neighbors",
        "//scann/utils:types",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/flags:flag",
        "@com_google_absl//absl/log",
        "@com_google_absl//absl/log:check",
        "@com_google_absl//absl/time",
    ],
)
